<template>
  <div class="dashboard-container">
    <div class="dashboard-text">name: {{ userName }}</div>
    <PageTools :show-before="true">
      <!-- 使用1:slot="插槽名" -->
      <!-- 使用2:v-slot:插槽名,写在 template 中 -->
      <template v-slot:before>
        <span>李佳卫</span>
      </template>
      <template v-slot:after>
        <el-button>带年纪</el-button>
      </template>
    </PageTools>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import PageTools from '@/components/PageTools'
export default {
  name: 'Dashboard',
  components: {
    PageTools
  },
  computed: {
    ...mapGetters(['userName'])
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
